package com.yzs.exam.common.base;

import com.yzs.exam.context.WebContext;
import com.yzs.exam.entity.User;
import com.yzs.exam.utils.ModelMapperSingle;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 保存全局的上下文  +  moderMapper做po装换为vo
 * @author yzs
 * @create 2021-03-17 22:14
 */
public class BaseApiController {
    protected final static String DEFAULT_PAGE_SIZE = "10";
    protected final static ModelMapper modelMapper = ModelMapperSingle.Instance();
    @Autowired
    protected WebContext webContext;

    protected User getCurrentUser() {
        return webContext.getCurrentUser();
    }
}
